<template>
<view class="container padding">
	<view class="resource-item-footer sec-top">关闭将无法收到相关消息的推送</view>
	<view class="profile-banner detail-white">
		<view class="task-list">
			<view class="task-item border"
				@click="onTaskItem('comment')">
				<view class="task-item-content">
					<text>评论与@</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item border"
				@click="onTaskItem('praised')">
				<view class="task-item-content">
					<text>点赞</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item border"
				@click="onTaskItem('fans')">
				<view class="task-item-content">
					<text>粉丝</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item border"
				@click="onTaskItem('notice')">
				<view class="task-item-content">
					<text>系统通知</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
			<view class="task-item"
				@click="onTaskItem('message')">
				<view class="task-item-content">
					<text>消息</text>
				</view>
				<switch color="#EEEEEE"
					style="transform:scale(.7)"
					:checked="checked" />
			</view>
		</view>
	</view>
</view>
</template>

<script>
export default {
	data() {
		return {
			checked: false
		}
	},
	onShow() {
		const token = uni.getStorageSync('X-Auth-Token');
		if (!token) {
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
	},
	methods: {
		onTaskItem(type) {
			switch(type) {
				case 'comment':
					break;
				case 'praised':
					break;
				case 'fans':
					break;
				case 'notice':
					break;
				case 'message':
					break;
				default:
					break;
			}
		}
	}
}
</script>
